﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Services;
using System.Web.Services.Protocols;

namespace Services
{
    /// <summary>
    /// TestService 的摘要说明
    /// </summary>
    [WebService(Namespace = "http://yaowt.com/webservice/test")]
    [WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
    [System.ComponentModel.ToolboxItem(false)]
    public partial class TestServices : WebService
    {
        public AccessTokenHeader accessToken;

        [WebMethod(EnableSession = true)]
        public string CurrentUser()
        {
            return Context.Session["CurrentUser"]?.ToString();
        }

        [WebMethod,SoapHeader("accessToken", Direction = SoapHeaderDirection.InOut)]
        public string TestAuthAccessToken()
        {
            return "TestAuthAccessToken被正常调用";
        }
    }
}
